10 LET Z$=" " 19 LET Q=0 20 LET P=0 30 PRINT AT 0,0;"CLOSEST TO 31 BUT NOT OVER WINS.";AT 4,3;"\::%Y%O%U\::";AT 4,20;"\::%T%S%1%0%0%0\::" 40 PRINT AT 5,4;P;AT 16,0;"DO YOU WISH A NUMBER?";AT 18,0;"TYPE Y OR N." 45 LET A$=INKEY$ 47 IF A$<>"N" AND A$<>"Y" THEN GOTO 45 50 IF A$="N" THEN GOTO 200 55 PRINT AT 16,0;Z$;AT 18,0;Z$ 60 LET C=INT (RND*11)+1 62 LET P=P+C 65 PRINT AT 16,0;"YOUR NUMBER IS ";C 80 GOTO 40 200 LET C=INT (RND*11)+1 210 PRINT AT 16,0;Z$;AT 18,0;Z$;AT 16,0;"MY NUMBER IS ";C 220 LET Q=Q+C 225 PRINT AT 5,22;Q 230 IF Q<25 THEN GOTO 200 240 IF (Q>P AND Q<32) OR (Q<32 AND P>31) THEN PRINT AT 16,0;" I WIN." 245 IF (Q
31 AND P<32) THEN PRINT AT 16,0;" YOU WIN." 250 IF Q=P OR (P>31 AND Q>31) THEN PRINT AT 16,0;" WE TIED." 260 PRINT AT 18,0;"PRESS ENTER TO PLAY AGAIN." 270 PAUSE 40000 280 CLS 290 GOTO 1